package com.coderush.admin.sys.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.coderush.admin.core.common.PageResult;
import com.coderush.admin.sys.model.entity.Company;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.coderush.admin.sys.model.vo.CompanySimpleVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author Administrator
* @description 针对表【sys_company(公司表)】的数据库操作Mapper
* @createDate 2025-08-17 21:19:03
* @Entity com.stellarforce.admin.sys.model.entity.Company
*/
@Repository
public interface CompanyMapper extends BaseMapper<Company> {

    Company getCompanyByName(String companyName);

    Company getCompanyByCode(String companyCode);

    /**
     * 分页查询
     * @param page
     * @param companyName
     * @return
     */
    Page<Company> findByPage(@Param("page") Page<Company> page, String companyName);

    /**
     * 获取公司信息
     * @param id
     * @return
     */
    Company getCompanyWithStatus(Long id);

    List<CompanySimpleVo> findAllCompanyList();

    List<CompanySimpleVo> findCompanyList(Long companyId);
}




